package com.imufe.chemicalenterprisedangerwarning.entity.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 化学品
 * </p>
 *
 * @author BaiBan
 * @since 2022-09-21
 */
@Getter
@Setter
@TableName("chemical")
@ApiModel(value = "化学品")
public class ChemicalPO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("化学品名称")
    private String name;

    @ApiModelProperty("化学品状态;0-气态; 1-液态; 2-固态;")
    private Byte status;

    @ApiModelProperty("是否危险")
    @TableField("is_danger")
    private Boolean danger;

    @ApiModelProperty("是否重点监管")
    @TableField("is_supervision")
    private Boolean supervision;

    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
